package com.ybkj.daijia.server.model;


import java.io.Serializable;
import java.util.List;


public class RentInsuranceQuery implements Serializable {


    private Integer isGrounding;

    private String param;

    private List<Long> ids;

    private Long id;

    private String appkey;

    private Integer page;

    private Integer rows;

    private Long carId;


    private Integer offset;

    /**
     * 根据page和rows计算出偏移量.
     */
    public Integer getOffset() {
        if (getPage() == null || getRows() == null) {
            return null;
        }
        if (getPage() > 1) {
            return (getPage() - 1) * getRows();
        }

        return offset;

    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getIsGrounding() {
        return isGrounding;
    }

    public void setIsGrounding(Integer isGrounding) {
        this.isGrounding = isGrounding;
    }

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAppkey() {
        return appkey;
    }

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getRows() {
        return rows;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }


}
